package com.lottery.material.service.portal.article;

import com.lottery.material.pojo.article.ArticleInfo;
import com.lottery.material.pojo.conf.VocabularyFilterConfig;
import com.lottery.material.pojo.page.PageData;
import com.lottery.material.pojocustom.article.ArticleInfoCustom;
import com.lottery.material.util.ResponseResult;
import com.lottery.material.vo.portal.article.ArticleDeletedVo;
import com.lottery.material.vo.portal.article.ArticleInfoListVo;
import com.lottery.material.vo.portal.user.CollectArticleUserVo;

import javax.servlet.http.HttpServletRequest;
import java.util.List;
import java.util.Map;

public interface ArticleInfoService{
    /**
    * @Author: houjie
    * @Description: 根据用户userId及圈子id查询当天的帖子
    * @Date: 2019/4/9 16:58
    */
    List<ArticleInfo> findTheDayByUserIdAndCircleId(PageData pd);

    List<Map<String,Object>> findByUserIdAndPage(Map<String,Object> map);

    List<ArticleDeletedVo> findDeletedArticleByUserId(Map<String,Object> map);

    List<Map<String, Object>> findPurchasedArticleByUserIdAndPage(Map<String, Object> paramMap);

    List<CollectArticleUserVo> findCollectArticleByUserIdAndPage(Map<String, Object> paramMap);

    /**
    * @Author: houjie
    * @Description: 查询风控词汇
    * @Date: 2019/4/18 11:17
    */
    List<VocabularyFilterConfig> findVocabularyFilterConfigList();
    
    /**
    * @Author: houjie
    * @Description: 验证文章是否具有分控词汇
    * @Date: 2019/4/18 11:29
    */
    ResponseResult vocabularyFilter(Map<String, String> reqParamMap,List<VocabularyFilterConfig> vocabularyFilterConfigList);

    /**
    * @Author: houjie
    * @Description: 保存发帖内容
    * @Date: 2019/4/18 13:38
    */
    ResponseResult insertArticleInfo(Map<String, String> reqParamMap, HttpServletRequest request);

    /**
     * description: 根据文章id查询
     * author sunny
     * createDate 2019-04-16 下午 4:24
     * @param articleId
     * @return
     */
    ArticleInfo findByArticleId(String articleId);

    /**
     * description: 根据用户userId及圈子id查询累计发帖量
     * author sunny
     * createDate 2019-04-16 下午 8:19
     * @param userId
     * @param circleId
     * @return
     */
    Integer findCountByUserIdAndCircleId(String userId, String circleId);

    /**
     * description: 查询当前比赛下的文章
     * author sunny
     * createDate 2019-04-23 上午 11:31
     * @param paramMap
     * @return
     */
    List<ArticleInfoListVo> findCompetitionArticle(Map<String, Object> paramMap);

    /**
     * description: 查询当前圈子下的文章
     * author sunny
     * createDate 2019-04-23 下午 2:51
     * @param paramMap
     * @return
     */
    List<ArticleInfoListVo> findCircleArticle(Map<String, Object> paramMap);

    /**
     * description: 根据文章id查询详情
     * author sunny
     * createDate 2019-04-23 下午 5:52
     * @param articleId
     * @return
     */
    ArticleInfoCustom findArticleDetailByArticleId(String articleId);

    /**
     * description: 修改文章中所含赛事为结束状态
     * author sunny
     * createDate 2019-04-19 下午 3:04
     * @param articleId
     */
    void updateIsCompetitionEndForTrue(String articleId);

    /**
     * description: 更新文章阅读量
     * author sunny
     * createDate 2019-04-25 下午 4:39
     * @param articleId
     */
    void updateReadTotalByArticleId(String articleId);

    /**
     * description: 更新文章信息
     * author sunny
     * createDate 2019-04-26 下午 4:38
     * @param articleInfo
     */
    void updateArticleInfo(ArticleInfo articleInfo);

    /**
     * description: 根据圈子Id查询文章置顶总数
     * author sunny
     * createDate 2019-04-30 上午 9:53
     * @param circleId
     * @return
     */
    Integer findTopCountByCircleId(Integer circleId);
}
